home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000091_icon-group-sender_Sat Oct 26 11:58:31 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g9QIuuE26658
  4.     for icon-group-addresses; Sat, 26 Oct 2002 11:56:56 -0700 (MST)
  5. Message-Id: <200210261856.g9QIuuE26658@baskerville.CS.Arizona.EDU>
  6. From: xadeu2002@hotmail.com (adeukcin)
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Icon broken?
  9. Date: 26 Oct 2002 00:09:39 -0700
  10. X-Complaints-To: groups-abuse@google.com
  11. To: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15. I am trying to write a simple Regular Expression...
  16. s := "Ic(cond)best"
  17. re := RePat("( \(cond\) )")
  18.  
  19. i := 0
  20. j := 0
  21.  
  22. i := ReFind(re,s)
  23. j := ReMatch(re,s,i)
  24.  
  25. s[i:j] := "on is the"
  26. write(s[i:j])
  27.  
  28. >From what I understand...
  29. This should output something like...
  30. "Icon is the best"
  31. instead it gives me somthing like...
  32. "Ic(on is the)best"
  33.  
  34. the \( does not seem to remove the special meaning from (
  35.  
  36. So if what I am wanting to do is possible...how...
  37. If I am doing this wrong...can you explain?
  38.  
  39. Thank you very very much!!!
  40.